package com.zeei.ems.meet.controller;

import com.github.pagehelper.PageInfo;
import com.zeei.ems.base.constant.GlobalConstant;
import com.zeei.ems.base.controller.BasicController;
import com.zeei.ems.base.page.PageParamVO;
import com.zeei.ems.base.result.ResultRowsVO;
import com.zeei.ems.meet.model.ProcessLogVO;
import com.zeei.ems.meet.model.vo.ProcessLogParam;
import com.zeei.ems.meet.service.ProcessLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "流程日志接口")
@RestController
@RequestMapping("/ems/process/log")
public class ProcessLogController extends BasicController {
    @Autowired
    ProcessLogService processLogService;

    /**
     * 查询流程日志信息列表
     * @param processLogParam 流程日志数据信息
     * @return 返回流程日志数据信息列表
     */
    @ApiOperation(value = "查询流程日志信息列表")
    @PostMapping("/list")
    public ResultRowsVO<ProcessLogVO> listEquip(PageParamVO page,
                                                @RequestBody ProcessLogParam processLogParam){
        PageInfo<ProcessLogVO> equipList = processLogService.listProcessLog(page, processLogParam);
        return this.createResultRowsVO(equipList, GlobalConstant.SUCCEED);
    }
}
